import mixin from './libs/mixin/mixin.js'
import colorGradient from './libs/function/colorGradient.js'
import index from './libs/function/index.js'
import platform from './libs/function/platform'

const $stec = {
    date: index.timeFormat, // 另名date
    colorGradient: colorGradient.colorGradient,
    hexToRgb: colorGradient.hexToRgb,
    rgbToHex: colorGradient.rgbToHex,
    colorToRgba: colorGradient.colorToRgba,
    platform
}

// $stec挂载到uni对象上
uni.$stec = $stec


import sCollapse from './components/s-collapse/s-collapse.vue'
import sCollapseItem from './components/s-collapse-item/s-collapse-item.vue'
const install = (Vue) => {
    // 可以在这里注册各种filter...
    Vue.prototype.$stec = $stec
	Vue.component('s-collapse', sCollapse)
	Vue.component('s-collapse-item', sCollapseItem)	
    Vue.mixin(mixin)
}

export default {
    install
}
